home *** CD-ROM | disk | FTP | other *** search
- /********************************
- Messenger.h
-
- By Kirk Chase with code from Paul Potts
-
- Created 10/3/89
-
- This is the header file for constants and prototypes of
- HandleDialog.c. This is used to provide a useful set of
- routines to use and modify for working with ModalDialogs
- and Alerts
- *********************************/
-
- #define _H_Messenger
-
- #define NUL 0
- #define nul 0
-
- #define TRUE 1
- #define FALSE 0
-
- #define edgeCurve 16 /* Constants for drawing roundRect */
- #define gapBetween -4
- #define lineSize 3
-
- #define theReturnKey 13
- #define theEnterKey 3
-
- #define MessageBase 3000
-
- #define MTop 50
- #define MLeft 120
- #define MHeight 135
- #define MWidth 328
-
- #define CENTER 2
- #define THIRD 3
-
- #define HORIZONTAL 1
- #define VERTICAL 0
-
- #define noIcon -1
-
- #define M_BUTTONLESS 5
- #define M_OK 1
- #define M_OK_CANCEL 2
- #define M_YES_NO 3
- #define M_YES_NO_CANCEL 4
-
- typedef struct DialogInfo {
- short defaultItem;
- int Buttons;
- int dPlace;
- short dIcon;
- Rect IconRect;
- Rect Button1Rect;
- Rect Button2Rect;
- Rect Button3Rect;
- Rect TextRect;
- Rect dRect;
- int Arrange;
- ProcPtr AddFilter;
- Str255 Button1;
- Str255 Button2;
- Str255 Button3;
- Str255 CharEquiv;
- } DialogInfo, *DialogInfoPointer, **DialogInfoHandle;
-
- extern DialogInfo MInfo;
- extern int menu_hieght;
-
- int MenuBar_Hieght(void);
- void GetMInfo(DialogInfoPointer theMInfo);
- void SetMInfo(DialogInfo theMInfo);
- void SetUpButtons(int numButtons, short theDefault, char *b1, char *b2, char *b3, char *cq);
- void SetUpRects(int dHor, int dVer, int bHor, int bVer);
- void PositionRect(Rect *smallRect, Rect *largeRect, int HOption, int VOption);
- void BoldRect(Rect border);
- int DoMessage(char *s0, char *s1, char *s2, char *s3);
- void InitMessage();
- int ArrangeMessage();
- int Message(int theType, int theIcon, char *s0, char *s1, char *s2, char *s3);
- int SaveChanges(char *s1, char *s2);
- char AnOSError(OSErr theError, char *s1, char *s2);